package crp.core.security.domain.models;

import io.quarkus.security.identity.request.AuthenticationRequest;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;

import java.util.Map;

@Getter
@Builder
@AllArgsConstructor
public class SSOAuthenticationRequest implements AuthenticationRequest {
    private final String provider;
    private final Map<String, Object> attributes;

    @Override
    public <T> T getAttribute(String name) {
        return (T) attributes.get(name);
    }

    @Override
    public void setAttribute(String name, Object value) {
        attributes.put(name, value);
    }
}
